﻿@using Peresvet.Helpers

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>@ViewBag.Title</title>
		<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
		<meta name="viewport" content="width=device-width" />
		@Scripts.Render("~/bundles/jquery")
		@Scripts.Render("~/bundles/responsiveSlidesJsBundle")
		@Scripts.Render("~/bundles/galleryJsBundle")
		@Styles.Render("~/Content/css")
	</head>
	<body>
		<div>
			<ul class="rslides" id="slider1">
				<li><img src="~/Images/HeadSlider/1.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/2.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/3.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/4.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/5.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/6.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/7.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/8.jpg" alt=""></li>
				<li><img src="~/Images/HeadSlider/9.jpg" alt=""></li>
			</ul>

			<div class="menu">
				@Html.Menu()
			</div>

			<div class="content-peresvet">
				@RenderBody()
			</div>
			
			<div class="footer">
				@Html.Partial("Footer")
			</div>
		</div>

		@RenderSection("scripts", required: false)
		<script>
			// You can also use "$(window).load(function() {"
			$(function () {
				// Slideshow 1
				$("#slider1").responsiveSlides({
					maxwidth: 1920,
					speed: 1000
				});
			});
		</script>
		<script>
			// var h_hght = 400; // высота шапки
			var h_mrg = 0;     // отступ когда шапка уже не видна
			$(function () {
				$(window).scroll(function () {
					var top = $(this).scrollTop();
					var elem = $('.menu');
					var h_header = $('.rslides').height();
					if (top + h_mrg < h_header) {
						elem.css('top', (h_header - top));
					} else {
						elem.css('top', h_mrg);
					}
				});
			});
		</script>
	</body>
</html>
